<?php 
    require_once("include/game_core.php");
    require_once(USER_CONTROLLER_FILE);
    
    if ( (! UserController::isLoggedIn()) ||
            (! UserController::isPlaying())  ) {
        header( 'Location: index.php' ) ;
    }
    
    require_once(VIEW_BASE_FILE);
    require_once(GAME_VIEW_FILE);
    require_once(GAME_CONFIG_FILE);
    
    $view = new view_base();    
    $view->ShowHeader();    
?>
<link href="css/game.css" rel="stylesheet" type="text/css" media="all" />
<?php include("js/game_board_defs.php"); ?>
<script src="js/game_animation_timer.js"></script>
<script src="js/h5utils.js"></script>
<script src="js/game_defs.js"></script>	
<?php include("js/game_cards_defs.php"); ?>
<script src="js/game_validation.js"></script>	
<script src="js/game_ajax.js"></script>	
<script src="js/tools.js"></script>	
<script src="js/game_view.js"></script>	
<script src="js/game_popup.js"></script>	
<?php 
    $view->ShowMenu("none");
    $view->ShowConatinerHead();
    
    $game_view = new game_view();
    $game_view->ShowBoard();
?>
</div>
<script>   
    // Update Board First
    getOneTimeCurrentStateOfGame();
    postGameState();
    // Initilize Ajax Timer
    //var myVar=setTimeout(function(){postGameState()},ticker);
    var chatVar=setInterval(function(){getChatState()},chatTicker);
    
    DisableAllObjectFromBeingDragable();
</script>
<script src="js/game_controller.js"></script>	
<script src="js/game_dragndrop.js"></script>
<?php $view->ShowFooter(); ?>